﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SliderEdit_M.aspx.cs" Inherits="Omabar.CMS.CMS.SliderEdit_M" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <link rel="stylesheet" type="text/css" href="../CSS/bootstrap_min.css" media="all" />
    <link rel="stylesheet" type="text/css" href="../CSS/bootstrap_responsive_min.css" media="all" />
    <link rel="stylesheet" type="text/css" href="../CSS/Style.css" media="all" />
    <link rel="stylesheet" type="text/css" href="../CSS/todc_bootstrap.css" media="all" />
    <link rel="stylesheet" type="text/css" href="../CSS/Themes.css" media="all" />
    <link rel="stylesheet" type="text/css" href="../CSS/inside.css" media="all" />
    <script type="text/javascript" src="../JavaScript/jquery.1.8.3.js"></script>
    <script type="text/javascript" src="../JavaScript/jquery.cookie.js"></script>
    <script type="text/javascript" src="../JavaScript/bootstrap.js"></script>
    <script type="text/javascript" src="../JavaScript/jquery_validate_min.js"></script>
    <script type="text/javascript" src="../JavaScript/jquery_validate_methods.js"></script>
    <script type="text/javascript" src="../JavaScript/jquery_form_min.js"></script>
    <script type="text/javascript" src="../JavaScript/inside.js"></script>
    <title></title>
    <link rel="shortcut icon" href="../favicon.ico" />
    <!--[if IE 7]><link href="../CSS/font_awesome_ie7.css" rel="stylesheet" /><![endif]-->
    <!--[if lte IE 9]><script src="../JavaScript/watermark.js"></script><![endif]-->
    
    <link href="../KindEditor/Themes/Default/default.css" rel="stylesheet" />
    <script src="../KindEditor/kindeditor-min.js"></script>
    <script src="../KindEditor/lang/zh_CN.js"></script>
    <script src="../KindEditor/kindeditor.config-upfile.js"></script>
</head>
<body>
    <div id="main">
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span12">
                    <div class="box">
                        <div class="box-title">
                            <div class="span10">
                                <h3><i class="icon-edit"></i>请填写相关信息</h3>
                            </div>
                            <div class="span2"><a class="btn" href="Javascript:window.history.go(-1)">返回</a></div>
                        </div>

                        <div class="box-content">
                            <form action="../Handler/SliderEdit_M.ashx" method="post" class="form-horizontal form-validate">
                                <div class="control-group">
                                    <label for="SLIDER_IMAGE" class="control-label">图片：</label>
                                    <div class="controls">
                                        <div>
                                            <img type="img" src="<%=this.slider.SLIDER_IMAGE %>" style="max-height: 50px;" />
                                            <input type="hidden" name="SLIDER_IMAGE" value="<%=this.slider.SLIDER_IMAGE %>" class="input-medium" />
                                            <a class="btn insertimage">选择图片</a>
                                        </div>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label for="SLIDER_URL" class="control-label">链接：</label>
                                    <div class="controls">
                                        <input type="text" value="<%=slider.SLIDER_URL %>" name="SLIDER_URL" id="SLIDER_URL" style="width:600px;" data-rule-url="true" /><span class="maroon">*</span>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label for="SLIDER_DES" class="control-label">描述：</label>
                                    <div class="controls">
                                        <input type="text"  value="<%=slider.SLIDER_DES %>" name="SLIDER_DES" id="SLIDER_DES" style="width:600px;" data-rule-required="true" /><span class="maroon">*</span>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label for="SLIDER_SORT" class="control-label">排序：</label>
                                    <div class="controls">
                                        <input type="text"  value="<%=slider.SLIDER_SORT %>"  name="SLIDER_SORT" id="SLIDER_SORT" class="input-medium" data-rule-required="true"  data-rule-number="true" data-rule-max="100" data-rule-min="0"/><span class="maroon">*</span>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label for="SLIDER_TYPE" class="control-label">类型：</label>
                                    <div class="controls">
                                        <select name="SLIDER_TYPE" id="SLIDER_TYPE" runat="server">
                                            <%--<option value="0" selected="selected">T图(1920x800)</option>
                                            <option value="1">欧玛贝独创(1000*360)</option>
                                            <option value="2">特色项目(300*300)</option>
                                            <option value="3">当季热推</option>
                                            <option value="4">精品之旅</option>--%>
                                        </select><span class="maroon">*</span>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label for="SLIDER_BAK" class="control-label">备注：</label>
                                    <div class="controls">
                                        <input type="text"  value="<%=slider.SLIDER_BAK %>"  name="SLIDER_BAK" id="SLIDER_BAK" style="width:600px;" /><span class="maroon">*</span>
                                    </div>
                                </div>
                                <div class="form-actions">
                                    <input type="hidden" name="SLIDER_ID" value="<%=slider_id%>"/>
                                    <button type="submit" class="btn btn-primary">保存</button>
                                    <a class="btn" href="Javascript:window.history.go(-1)">取消</a>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<script type="text/javascript">
    KindEditor.ready(function (K) {
        var editor = K.editor({
            themeType: 'simple',
            allowFileManager: true
        });
        $('a.insertimage').live('click', function (e) {
            editor.loadPlugin('smimage', function () {
                editor.plugin.imageDialog({
                    imageUrl: $(e.target).prev().val(),
                    clickFn: function (url, title, width, height, border, align) {
                        $(e.target).prev().val(url);
                        if ('img' == $(e.target).prev().prev().attr('type')) {
                            $(e.target).prev().hide();
                            $(e.target).prev().prev().attr('src', url);
                            $(e.target).prev().prev().show();
                        }
                        editor.hideDialog();
                    }
                });
            });
        });
    });
</script>
</html>
